Feature: 律师主页
  作为一个律团用户
  我可以查看某个律师的主页
  这样我就可以更了解这个律师

# 页面的头部显示律师的个人信息： 从业机构，律师证号，擅长领域，执业年限，执业地域等
# 共有5个tabs: 个人介绍，文章分享，咨询回复，用户评价和成交纪录

# 不成功的Scenarios

Scenario: 如果这个律师不存在，系统会报404的错
 Given http "accept" header is "application/json"
  And I am on "/lawyer/list_lawyer?q=羊羊羊"
  And the response is in "json" format
  Then the response status code should be 404

# 成功的Scenarios

Scenario: 可以获取律师的个人简介
Given a lawyer "3" exists with:
| introduce | 
|   1234567  |
Given http "accept" header is "application/json"
  And I am on "/lawyer/3"
  And the response is in "json" format
  Then the response status code should be 200
  And I see message "1234567" for field "introduce"

Scenario: 可以获取律师的文章分享
# 要先在数据库中加入用户对律师的文章分享
Given http "accept" header is "application/json"
  And I am on "/lawyer/articles"
  And the response is in "json" format
  Then the response status code should be 200
  And I got message "/lawyer/articles" for field "path"

Scenario: 可以成功获取律师的咨询回复记录
# 要先在数据库中加入用户对律师的回复记录
Given a lawyer "3" exists with:
| introduce | 
|   123456  |
Given http "accept" header is "application/json"
  And I am on "/question/list_questions"
  And the response is in "json" format
  Then the response status code should be 200
  And I got message "/question/list_questions" for field "path"

Scenario: 可以成功获取用户对某个律师的评价,evaluations
# 要先在数据库中加入用户对律师的评价
Given a lawyer "3" exists with:
| comment    | 
|   123123  |
Given http "accept" header is "application/json"
  And I am on "/lawyer/3/evaluations"
  And the response is in "json" format
  Then the response status code should be 200
   And I see message "123123" for field "comment"

Scenario: 可以成功获取律师的成交记录,deals
# 要先在数据库中加入律师的成交记录
Given http "accept" header is "application/json"
  And I am on "/lawyer/3/deals"
  And the response is in "json" format
  Then the response status code should be 200
  And show each "lawyer" record  data

Scenario: 可以成功获取律师的从业范围列表
# 要先设置律师的擅长领域
/*Given a lawyer "3" exists with:
| introduce    | 
|   123456  |*/
Given http "accept" header is "application/json"
  And I am on "/lawyer/3"
  And the response is in "json" format
  Then the response status code should be 200
  And show each "lawyer" record  work_scope

Scenario: 可以成功获取律师的从业年限
# 要先设置律师的从业年限
Given a lawyer "3" exists with:
| practice_period    | 
|   十年  |
Given http "accept" header is "application/json"
  And I am on "/lawyer/3"
  And the response is in "json" format
  Then the response status code should be 200
  Then print last response
  And I see message "十年" for field "practice_period"
